{% extends "shop/base.html" %}
{% load i18n %}
{% load thumbnail %}
{% load satchmo_category %}
{% load satchmo_currency %}
{% load satchmo_util satchmo_discounts %}
{% load satchmo_tuning_category satchmo_tuning_cart %}

{% block extra-head %}
	{% if category.meta %}
		<meta name="description" content="{{ category.meta|escape }}">
	{% endif %}
	<script type="text/javascript" src="{{ media_url }}js/jquery.js"></script>
	<script type="text/javascript" src="{{ media_url }}js/jquery.form.js"></script>
	<script type="text/javascript" src="{{ media_url }}js/satchmo_tuning.js"></script>
	<script type="text/javascript">
	$(document).ready(function() {
		satchmo_tuning.setup_add_to_cart_form();
		var items_in_cart = { {% items_in_cart_js cart category %} };
		satchmo_tuning.update_product_list(items_in_cart);
	});
	</script>
{% endblock %}

{% block navbar %}
    <li class="first"><a href="/">{% trans "Главная" %}</a></li>
	{% for parent in category.parents %}<li><a href="{{ parent.get_absolute_url }}">{{ parent.translated_name }}</a></li>{% endfor %}
	<li>{{ category.translated_name }}</li>
{% endblock %}

{% block sidebar-categories %}
    <div id="categories_tree">
	{% sibling_category_tree category.id %}
    </div>
{% endblock %}

{% block content %}
<div id="product_list">
<h3>{{ category.translated_name }}</h3>

{% include 'product/_products.html' %}

{% if sale %}
{% include "product/some_discount_eligible.html" %}
{% endif %}
</div>
{% endblock %}
